home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / getprefs.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  50 lines

  1.      NOLIST
  2. GetPrefs    MACRO              ; 14 Sept 88
  3. *------------------------------; Start of GetPrefs macro.
  4.      NOLIST
  5.      IFC '\1','D'              ; If <BufferStartAddr> is specified, then
  6.      LIST
  7.                                ; Make A0 point to the start of the buffer.
  8.      MOVE.L #\2,A0
  9.      NOLIST
  10.      IFEQ NARG-2               ; If <BufferSize> is given, then
  11.      LIST
  12.                                ; Put <BufferSize> in D0.
  13.      MOVE.L #\3,D0
  14.      NOLIST
  15.      ENDC
  16.      IFEQ NARG-2               ; If there is no third argument, then
  17.      LIST
  18.                                ; Calculate buffer size as
  19.                                ;  <BufferStartAddr>End minus
  20.                                ;  <BufferStartAddr>. Put it in D0.
  21.      MOVE.L \2End-\2,D0
  22.      NOLIST
  23.      ENDC
  24.      ENDC
  25.      IFNC '\1','I'             ; If <MemBlockName> is specified, then
  26.      LIST
  27.                                ; Get the buffer start address from
  28.                                ;  <MemBlockName>.Adr , and get the buffer
  29.                                ; Size from <MemBlockName>.Size
  30.      NOLIST
  31.      IFEQ ReEntrant-1
  32.      LIST
  33.      MOVE.L \2.Adr(A5),A0
  34.      MOVE.L \2.Size(A5),D0
  35.      NOLIST
  36.      ENDC
  37.      IFNE ReEntrant-1
  38.      LIST
  39.      MOVE.L \2.Adr,A0
  40.      MOVE.L \2.Size,D0
  41.      NOLIST
  42.      ENDC
  43.      ENDC
  44.      LIST
  45.                                ; Call GetPrefs.
  46.      CallLib GetPrefs,intuition
  47. *------------------------------; End of GetPrefs macro.
  48.      ENDM
  49.      LIST
  50.